<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Web 设计</title>
        <link rel="shortcut icon" href="/mylogo/logo_k_icon_72.ico" type="image/x-icon" />
    </head>
    <body>
        <script>
            function changeImage()
            {
            element=document.getElementById('myimage')
            if (element.src.match("bulbon"))
              {
              element.src="img/eg_bulboff.gif";
              }
            else
              {
              element.src="img/eg_bulbon.gif";
              }
            }
        </script>

        <img id="myimage" onclick="changeImage()" src="img/eg_bulboff.gif">

        <p>点击灯泡来点亮或熄灭这盏灯</p>
    </body>
</html> 

